home *** CD-ROM | disk | FTP | other *** search
- stop();
- _root.track_x = track._x;
- _root.track_y = track._y;
- LGtimer = function()
- {
- this.reset();
- };
- LGt = LGtimer.prototype;
- LGt.reset = function()
- {
- this.oldTime = 0;
- this.pause = true;
- this.totalTime = 0;
- };
- LGt.stop = function()
- {
- if(!this.pause)
- {
- this.pause = true;
- this.totalTime += getTimer() - this.oldTime;
- }
- };
- LGt.start = function()
- {
- if(this.pause)
- {
- this.pause = false;
- this.oldTime = getTimer();
- }
- };
- LGt.getMili = function()
- {
- var returnTime = this.totalTime;
- if(!this.pause)
- {
- returnTime += getTimer() - this.oldTime;
- }
- return returnTime;
- };
- LGt.getSecs = function()
- {
- var returnTime = this.totalTime / 1000;
- if(!this.pause)
- {
- returnTime += (getTimer() - this.oldTime) / 1000;
- }
- return Math.round(returnTime);
- };
- LGt.getMins = function()
- {
- var returnTime = this.totalTime / 1000;
- if(!this.pause)
- {
- returnTime += (getTimer() - this.oldTime) / 1000 / 60;
- }
- return Math.round(returnTime);
- };
- LGt.getCount = function(secs)
- {
- var returnTime = this.totalTime;
- if(!this.pause)
- {
- returnTime += (getTimer() - this.oldTime) / 1000;
- }
- var count = secs - returnTime;
- return Math.round(count);
- };
-